<script type="text/javascript" language="javascript">
(function($) {
/*whatever jQuery stuff*/
	$(function(){
		//Set Video Source
		var url = "<?php echo image_asset_url($asset_award_upload_path.'home.mp4');?>";			
		var is_mobile = '<?php echo $this->agent->is_mobile();?>';	
		if(is_mobile){
			$('#my_video').append("<source id='mp4' src='"+url+"' type='video/mp4'>");
			$('#my_video').attr('src',""+url+"");
			$('#my_video').attr('width',640);
			$('#my_video').attr('height',390);			
			// videoplaza sdk, 4 sec time-out, callback function
			loadScript("<?php echo js_asset_url('media/html5-sdk-1.0.12.15.1-ea.min.js');?>",4000,initVideoplaza);
			// *** START - videoplaza plugin config ***
			vpConfig = {
				vphost : 'http://th-pmdplus.videoplaza.tv',
				category : 'award',
				tags : ['standard'],
				flags: [],
				playbackPosition: [] // mid-roll cue points, if any.
			}
			// *** END - videoplaza plugin config ***
			//Auto Play && Loop
			$('#my_video').attr('autoplay','autoplay');					
		} else {	
			jwplayer("vdoPlayer").setup({
				autostart: true,
		      	flashplayer: "<?php echo js_asset_url('media/player.swf');?>",
		      	width: 640,
		      	height: 390,
				file: ""+url+"",
		      	plugins: "<?php echo js_asset_url('media/vp_plugin.swf');?>",
		      	vpdomain: "http://th-pmdplus.videoplaza.tv",
		      	vpshares: "award",
		      	vptags: ""
			});		
		}				
	});	
})(jQuery);

function playThis(url)
{
		var is_mobile = '<?php echo $this->agent->is_mobile();?>';
		if(is_mobile){
			//Set Video Source
			$('#my_video').empty().append("<source id='mp4' src='"+url+"' type='video/mp4'>");
			$('#my_video').attr('src',""+url+"");
			$('#my_video').attr('width',640);
			$('#my_video').attr('height',390);			
			// videoplaza sdk, 4 sec time-out, callback function
			loadScript("<?php echo js_asset_url('media/html5-sdk-1.0.12.15.1-ea.min.js');?>",4000,initVideoplaza);
			// *** START - videoplaza plugin config ***
			vpConfig = {
				vphost : 'http://th-pmdplus.videoplaza.tv',
				category : 'award',
				tags : ['standard'],
				flags: [],
				playbackPosition: [] // mid-roll cue points, if any.
			}
			// *** END - videoplaza plugin config ***
			//Auto Play && Loop
			$('#my_video').attr('autoplay','autoplay');							
		} else {
			jwplayer("vdoPlayer").setup({
				autostart: true,
				flashplayer: "<?php echo js_asset_url('media/player.swf');?>",
			 	width: 640,
			 	height: 390,
				file: ""+url+"",
				events: {
					onComplete: function(event) {
						jwplayer().play();
					}
				},
			  	plugins: "<?php echo js_asset_url('media/vp_plugin.swf');?>",
			  	vpdomain: "http://th-pmdplus.videoplaza.tv",
			   	vpshares: "award",
			   	vptags: ""	
			});			
		}
}
</script>
<div class="wrap_content">
	<div id="vdo_top_bg"></div>
		<div id="vdo_content_bg">
			<!--Left Vdo-->
			<div id="leftVdo">
				<div id="VdoHeader"></div>
				<?php $video_award_2013 = range(7,1);?>
				<?php foreach($video_award_2013 as $value):?>
					<div class="leftVdoBlock">
						<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo image_asset_url($asset_award_upload_path.'video/'.sprintf('%03d',$value).'.mp4');?>');">
							<div class="image">
								<?php echo image_asset($asset_award_upload_path.'video/'.sprintf('%03d',$value).'.jpg','',array('width' => 157,'height' => 97));?>
							</div>
							<p class="bold">You2PlayAwards 2013 (<?php echo $value;?>/7)</p>
						</a>
					</div>					
				<?php endforeach;?>				
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_bce711913398b5316059c60d7b9781a0_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo17.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: ดิว &amp; แกงส้มThe Star</p>
					</a>
				</div>				
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_5a91d3bc8f2fc1be7dfba81f71fe996d_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo16.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: เวย์ไทยเทเนี่ยม และ แบงค์ แคช</p>
					</a>
				</div>				
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_8634a5b8075ec7e122c04d87bfc7b09d_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo15.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: Mild</p>
					</a>
				</div>				
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_61dded8d4ba850e4ba8d9a1779319e41_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo14.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: Big Ass</p>
					</a>
				</div>				
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_97a40ff2f20d37652e75159d17e8eb23_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo13.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: Better Weather และ Sugar Eyes</p>
					</a>
				</div>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_2496d348c85229765cb337afaa7169e0_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo12.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: นิว จิ๋ว, เต้น นรารักษ์, โรส ศิรินทิพย์</p>
					</a>
				</div>	
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_c8babe2d767afd2ee137c259e28b74a3_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo11.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: เป้ อารักษ์  สิงโต นำโชค   Plastic Plastic</p>
					</a>
				</div>				
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_43f2f9e0b3f51b0bf59aef5e343e1333_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo10.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: Southside feat. ขัน ไทยเทเนี่ยม</p>
					</a>
				</div>					
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_716ff3ecb172a67724196721775585e2_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo09.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013: โดม ปกรณ์ ลัม, The Poison, Mummy Daddy ศิลปินค่ายICONIC	</p>
					</a>
				</div>			
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_5d252560d3898af5b021e4a19ae54e8b_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo08.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">โชว์พิเศษในงาน You2play Awards 2013<br />แกรนด์-ฮั่น The Star</p>
					</a>
				</div>			
				<?php foreach($dataIntro as $value):?>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo image_asset_url($asset_award_upload_path.'artist/'.$value[0].'/'.$value[1].'/intro.mp4');?>');">
						<div class="image">
							<?php echo image_asset($asset_award_upload_path.'artist/'.$value[0].'/'.$value[1].'/artist_right_intro.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<?php 
							$dataXML = simplexml_load_file($this->upload_folder.'award/artist/'.$value[0].'/'.$value[1].'/data.xml');
						?>
						<p class="bold"><?php echo $dataXML->right_intro_title;?><br /><?php echo $dataXML->right_intro_subtitle;?></p>
					</a>
				</div>
				<?php endforeach;?>		
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_f9aaebe30ba2a7b0e70707279bcde825_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo01.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">You2PlayAwards 2011 (1/7)</p>
					</a>
				</div>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_1e9d1f36756c71afe776f6547b2ee9e0_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo02.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">You2PlayAwards 2011 (2/7)</p>
					</a>
				</div>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_a654f0a9eecec266d054436845cf180d_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo03.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">You2PlayAwards 2011 (3/7)</p>
					</a>
				</div>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_fa1f173289bb1b77a35deddaf2869f2b_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo04.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">You2PlayAwards 2011 (4/7)</p>
					</a>
				</div>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_daa8441c727d2e8831a0ddb28af75925_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo05.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">You2PlayAwards 2011 (5/7)</p>
					</a>
				</div>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_b32ea21a10955e3d077fd3a6ff58de23_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo06.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">You2PlayAwards 2011 (6/7)</p>
					</a>
				</div>
				<div class="leftVdoBlock">
					<a href="javascript:void(0);" onclick="javascript:playThis('<?php echo $this->config->item('base_asset_url').'../image/video/mp4_32443ed8c60d48fd4442681a0b781641_480_360.mp4';?>');">
						<div class="image">
							<?php echo image_asset($asset_award_image_path.'vdo07.jpg','',array('width' => 157,'height' => 97));?>
						</div>
						<p class="bold">You2PlayAwards 2011 (7/7)</p>
					</a>
				</div>																												
			</div>
			<!--Right Vdo-->
			<div id="rightVdo">
				<!--Social Nav-->
				<div id="socialNav">
					<div class="floatLeft">
						<div class="fb-like" data-href="<?php echo $award_url.'vdo';?>" data-send="true" data-width="450" data-show-faces="false"></div>
					</div>
					<div class="floatRight">
						<a href="https://twitter.com/share" class="twitter-share-button" data-lang="th">ทวีต</a>
						<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
					</div>				
					<div class="floatRight">
						<a name="fb_share" type="button_count" href="http://www.facebook.com/sharer.php">Share</a>
						<script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>
					</div>
				</div>
				<center><a href="<?php echo $award_url."ment";?>"><?php echo image_asset($asset_award_image_path.'artist_ment.png','',array('width' => 640,'height' => 103));?></a></center>
				<!--Comment Facebook Plugin-->
				<div id="artistComment">
					<div class="fb-comments" data-href="<?php echo $award_url.'vdo';?>" data-width="640" data-num-posts="20"></div>
				</div>			
			</div>
			<div class="clear"></div>
		</div>
	<div id="vdo_bottom_bg"></div>
	<!--Sponser2-->
	<?php echo CI('module_sponser2');?>	
</div>